<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    <style type="text/css">
        body {
            background: #007bff;
            background: linear-gradient(to right, #0062E6, #33AEFF);
        }

        .btn-login {
            font-size: 0.9rem;
            letter-spacing: 0.05rem;
            padding: 0.75rem 1rem;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
            <div class="card border-0 shadow rounded-3 my-5">
                <div class="card-body p-4 p-sm-5">
                    <h5 class="card-title text-center mb-5 fw-light fs-5">监考信息管理系统</h5>
                    <form class="was-validated" th:action="@{/Teacher/doRegister}" method="post">
                        <div class="form-floating mb-3">
                            <input type="email" class="form-control" id="floatingInput" name="username" placeholder="name@example.com" th:value="${username}" required>
                            <label for="floatingInput">电子邮箱</label>
                            <div class="valid-feedback">有效邮箱</div>
                            <div class="invalid-feedback">请输入正确的电子邮箱</div>
                        </div>
                        <div class="form-floating mb-3">
                            <input type="password" class="form-control" id="floatingPassword" name="password1" placeholder="Password" th:value="${password1}" required>
                            <label for="floatingPassword">登录密码</label>
                            <div class="valid-feedback">有效密码</div>
                            <div class="invalid-feedback">请输入正确的密码</div>
                        </div>
                        <div class="form-floating mb-3">
                            <input type="password" class="form-control" id="confirmPassword" name="password2" placeholder="Password" th:value="${password2}" required>
                            <label for="confirmPassword">验证密码</label>
                            <div class="valid-feedback">有效密码</div>
                            <div class="invalid-feedback">请输入正确的密码</div>
                        </div>
                        <div class="d-grid">
                            <button class="btn btn-primary btn-login text-uppercase fw-bold" type="submit">注册</button>
                        </div>
                    </form>
                    <p th:text="${msg}" style="color:red" />
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>